package cn.innosmart.aq.bean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by David on 2015/6/19.
 */
public class BannerInfo {
    private String imageUrl;
    private String title;
    private String linkUrl;
    private String filePath;
    private int imageId;



    public BannerInfo(String imageUrl, String title, String linkUrl, String filePath, int imageId){
        this.imageUrl=imageUrl;
        this.title=title;
        this.linkUrl=linkUrl;
        this.filePath=filePath;
        this.imageId=imageId;
    }
    public BannerInfo(String json){
        try {
            JSONObject jsonBanner=new JSONObject(json);
            this.imageUrl= jsonBanner.getString("imageUrl");
            this.title=jsonBanner.getString("title");
            this.linkUrl=jsonBanner.getString("linkUrl");
            this.filePath=null;
        } catch (JSONException e) {
            e.printStackTrace();
        }

    }

    public int getImageId() {
        return imageId;
    }

    public void setImageId(int imageId) {
        this.imageId = imageId;
    }
    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
}
